import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { RoutesRoutingModule } from './routes-routing.module';
import {
  HomeComponent,
  HomeResolveService,
  Exception403Component,
  Exception404Component,
  Exception500Component,
  HomeResolve,
  SheetListResolve,
  CarouselComponent,
  LoginCardComponent,
  SheetListService,
  SheetListComponent,
  SheetDetailComponent,
  SheetDetailResolve,
  SongDetailComponent,
  SongDetailResolve,
  SingerDetailComponent,
  SingerDetailResolve
} from './';

const EXCEPTION_COMPONENT = [
  Exception403Component,
  Exception404Component,
  Exception500Component,
];

const COMPONENTS = [
  HomeComponent,
  CarouselComponent,
  LoginCardComponent,
  SheetListComponent,
  SheetDetailComponent,
  SongDetailComponent,
  SingerDetailComponent,
  ...EXCEPTION_COMPONENT
];

const SERVICES = [
  HomeResolve,
  HomeResolveService,
  SheetListService,
  SheetListResolve,
  SheetDetailResolve,
  SongDetailResolve,
  SingerDetailResolve
];

@NgModule({
  declarations: [...COMPONENTS],
  imports: [
    SharedModule,
    RoutesRoutingModule,
  ],
  providers: [...SERVICES],
})
export class RoutesModule { }
